<template>
  <div class="container">
    <div class="left">
      <div>
        <span
          @click="setActiveContent(0)"
          :class="{ 'active-border': activeIndex === 0 }"
        >
          气象预警
        </span>
        <span
          @click="setActiveContent(1)"
          :class="{ 'active-border': activeIndex === 1 }"
          >闭环管理</span
        >
        <span
          @click="setActiveContent(2)"
          :class="{ 'active-border': activeIndex === 2 }"
        >
          靶向发布
        </span>
      </div>
    </div>
    <div class="right">
      <div class="table">
        <!-- 气象预警 -->
        <weatherWarn v-if="activeIndex === 0"></weatherWarn>
        <!-- 闭环管理 -->
        <closedLoop v-if="activeIndex === 1"></closedLoop>
        <!-- 靶向发布 -->
        <targeted v-if="activeIndex === 2"></targeted>
        <!-- <div class="page">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-size="pageSize"
              layout="prev, pager, next"
              :total="total"
              background
              class="custom-pagination"
            >
            </el-pagination>
          </div> -->
      </div>
    </div>
  </div>
</template>

<script>
import weatherWarn from "@/components/travel-warnings/weatherWarn.vue";
import closedLoop from "@/components/travel-warnings/closedLoop.vue";
import targeted from "@/components/travel-warnings/targeted.vue";
import { Circle } from "ol/geom";
export default {
  name: "warning",
  components: {
    weatherWarn,
    closedLoop,
    targeted,
  },
  data() {
    return {
      date: "",
      activeIndex: 0,
      selectedCity: "",
      selectedCounty: "",
      selectedTownship: "",
      search: "",
    };
  },
  mounted() {},
  methods: {
    setActiveContent(index) {
      this.activeIndex = index;
    },
  },
};
</script>

<style lang="scss" scoped>
.container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;

  .left {
    width: 15%;
    height: 95%;
    border: #01522c 5px dashed;
    border-radius: 20px;

    div {
      width: 100%;
      height: 98%;
      display: flex;
      justify-content: flex-start;
      flex-direction: column;
      align-items: center;
      flex-wrap: wrap;

      span {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 95%;
        height: 10%;
        display: flex;
        color: white;
        cursor: pointer;
      }
      .active-border {
        color: #47c364 !important;
      }
    }
  }

  .right {
    width: 75%;
    height: 95%;

    /*表格 */
    .table {
      width: 100%;
      height: 100%;
      color: #fff;
      font-size: large;
      ::v-deep .el-tabs__item {
        color: #fff;
      }
      /* 下划线颜色 */
      ::v-deep .el-tabs__active-bar {
        background-color: #47c364;
      }
      ::v-deep .el-tabs__item.is-active {
        color: #47c364; //选中
      }
    }
  }
}
</style>